Simplify code to use null
authorJeremy Bryant <jb@jeremybryant.net>
Mon, 18 Mar 2024 23:18:30 +0000 (23:18 +0000)
committerJustin Burkett <justin@burkett.cc>
Tue, 9 Apr 2024 17:51:20 +0000 (13:51 -0400)
* which-key.el (which-key--create-buffer-and-show):
Use null.

which-key.el

index 2f2c2804f556572bb4e12cda96bef4550c012e56..f2f86269fc1a3251ca1f3d4c60729bf3f662fd7d 100644 (file)
@@ -2692,7 +2692,7 @@ Finally, show the buffer."
         (formatted-keys (which-key--get-bindings
                          prefix-keys from-keymap filter))
         (prefix-desc (key-description prefix-keys)))
-    (cond ((= (length formatted-keys) 0)
+    (cond ((null formatted-keys)
            (message "%s-  which-key: There are no keys to show" prefix-desc))
           ((listp which-key-side-window-location)
            (setq which-key--last-try-2-loc